home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: andy0756@ix.netcom.com (Andy Connors)
- Newsgroups: comp.lang.c++
- Subject: Re: Making your own streambuf classes
- Date: 11 Apr 1996 02:27:43 GMT
- Organization: Netcom
- Message-ID: <4khqmv$enc@dfw-ixnews8.ix.netcom.com>
- References: <4k64mu$9v@oden.abc.se>
- NNTP-Posting-Host: irv-ca15-21.ix.netcom.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-NETCOM-Date: Wed Apr 10 9:27:43 PM CDT 1996
- X-Newsreader: WinVN 0.99.7
-
- In article <4k64mu$9v@oden.abc.se>, mikes@abc.se writes...
- >
- >I'm trying to write some custom streambuf classes for handling other
- >kinds of data sources than files and strings. But it's more difficult
- >than I expected. Where can I find useful reference documents?
- >
- >The current problem is how the sync() method should be implemented.
- >What it sync() supposed to do? I found a source for filebuf using
- ><io.h>, it used lseek() in sync. I'm working with strictly sequencial
- >data sources (such as an asynchronous serial port) where you can't do
- >something like that.
- >
-
- Hi,
-
- Try the IOStreams Handbook by Steve Teale. I don't have the ISBN number (it's
- at work and I'm at home now), but I believe it's published by Addison-Wesley.
- It's a little dated (streams are now template-based), but it has the
- information you need. I've also found the Watcom C++ hardcopy manuals to
- have very good information regarding stream classes and the protocol that
- derived streambuf classes should adhere to regarding the override of sync() and
- others. And yes, it's a difficult subject.
-
- Andy Connors
-
-
-